Conversation
ZooKeeper.close() treated AUTH_FAILED clients as already closed and skipped prompt shutdown of their connection threads. Signed-off-by: 1fanwang <1fannnw@gmail.com>
Member
I checked the reproduction steps from ZOOKEEPER-4947 and think the behavior is temporary as |
Member
|
Withdraw my +1. I think what we need to do is quiting send loop right after |
Signed-off-by: 1fanwang <1fannnw@gmail.com>
Signed-off-by: 1fanwang <1fannnw@gmail.com>
Author
|
Done in 2dd3c44. The send loop now exits on AUTH_FAILED without caller close; the description is corrected. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After SASL authentication fails, the send thread can remain in a transport wait. It eventually exits; the event thread already stops. Break out at the authentication-failure branch before another transport wait, so the existing cleanup runs without caller close. The client retains
AUTH_FAILED; explicit close still setsCLOSED.https://issues.apache.org/jira/browse/ZOOKEEPER-4947
Testing Done
The bad-DIGEST fixture uses a real file-backed loopback server and a 30-second session. It logs shutdown before close with a one-second bound per thread, then asserts shutdown, the retained failure state and request error.
From this PR's checkout, apply only its test changes to the baseline:
With JDK 25 and cached Maven dependencies, run this in the baseline and PR checkouts:
Both baseline runs exited 1 with:
The baseline observations below are NIO followed by Netty:
After the fix, both runs exited 0: